phy_fixed_rotation

Enables (or disables) rotation from external forces.

语法:

phy_fixed_rotation;


返回: 布尔值


描述

This variable can be used to set whether or not the instance can be affected by rotational forces (default is false). If this is set to true, no external force (either from coded impulses or forces, or from collisions) will affect the rotation value of the instance and this would have to be set manually using the phy_rotation variable.


例如:

phy_rotation = 0;
phy_fixed_rotation = true;

The above code will switch the instance to have a fixed rotation, then set the rotation angle.


上一页: Physics Variables
next: phy_bullet
© Copyright YoYo Games Ltd. 2018 All Rights Reserved